<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <body>
        <ui:composition template="/publico/template.xhtml">
            <ui:define name="content">
                <h:form>
                    <h:inputHidden
                        id="itLote1"
                        value="#{loteBean.lote}"
                        converter="LoteConversor" />
                    <p:commandButton 
                        id="cbcancelar1"
                        ajax="false" 
                        action="#{loteBean.cancelar}" 
                        value="Cancelar"/>
                </h:form>
                <h:form id="fprincipal" >
                    <p:messages/>
                    <h:inputHidden
                        id="itLote"
                        value="#{loteBean.lote}"
                        converter="LoteConversor" />
                    <p:panel header="Transporte" >
                        <h:panelGrid columns="2" cellpadding="10" >
                            <h:outputLabel 
                                id="olLote"
                                for="itLote" 
                                value="Lote: "/>
                            <h:outputText value="#{loteBean.lote.id}" />
                            <h:outputLabel 
                                id="oldestino"
                                for="sodestino" 
                                value="destino: *"/>
                            <h:selectOneMenu 
                                id="sodestino" 
                                value="#{loteBean.transporte.destino}">
                                <f:selectItems value="#{loteBean.selectLocal}" />
                                <f:converter converterId="LocalConversor"/>
                            </h:selectOneMenu>
                            <h:outputLabel 
                                id="oltransporte"
                                for="cdatatransporte" 
                                value="Data do transporte: *"/>
                            <p:calendar 
                                id="cdatatransporte" 
                                value="#{loteBean.transporte.dataTransporte}" 
                                required="true"
                                pattern="dd/MM/yyyy">
                                <p:message for="cdatatransporte" />
                            </p:calendar>
                            <p:commandButton 
                                id="cbsalvar"
                                ajax="false" 
                                action="#{loteBean.salvarTransporte}" 
                                value="Salvar"/>
                        </h:panelGrid>
                    </p:panel>
                </h:form>
                
            </ui:define>
        </ui:composition>

    </body>
</html>
